<?php
  function mpsprofile_validation($form, &$form_state) {

    chkbadchar($form['field_mp_lok_designation']['und'][0]['value']['#value'],$form['field_mp_lok_designation']['und'][0]['value']['#title'],'field_mp_lok_designation');
    chkbadchar($form['title']['#value'],$form['title']['#title'],'title');
    chkbadchar($form['field_mp_addinfo']['und'][0]['value']['#value'],$form['field_mp_addinfo']['und'][0]['value']['#title'],'field_mp_addinfo');
    chkbadchar($form['field_mp_address']['und'][0]['value']['#value'],$form['field_mp_address']['und'][0]['value']['#title'],'field_mp_address');
    chkbadchar($form['field_mp_add_delhi']['und'][0]['value']['#value'],$form['field_mp_add_delhi']['und'][0]['value']['#title'],'field_mp_add_delhi');
    chkbadchar($form['field_mp_email']['und'][0]['value']['#value'],$form['field_mp_email']['und'][0]['value']['#title'],'field_mp_email');
    badurl($form['field_mp_website']['und'][0]['value']['#value'],$form['field_mp_website']['und'][0]['value']['#title'],'field_mp_website');
  }